home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1985 October
/
Ahoy_Magazine_85-10_1985_Double_L.d64
/
error checker
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
54 lines
100 rem george trepal copyright 1985
110 rem 2650 alturas rd
120 rem bartow, fl 33830
130 clr:poke53281,0:poke53280,0:dimtr(40):print"[147][153]"
140 printspc(11)"disk error checker"
150 printspc(8)"[158]no knock -- tracks 1-40"
160 printspc(12)"[159]by george trepal"
170 print"[153]check <a>ll tracks or <s>elected tracks"
180 gety$:ify$<>"a"andy$<>"s"then180
190 ify$="a"thenft=1:lt=40:goto260
200 ft=-1:lt=50
210 input" first track to check";ft
220 ifft<1orft>40then210
230 input" last track to check";lt
240 iflt<1orlt>40then230
250 iflt<ftthen210
260 printspc(5)"print out errors found (y/n)?"
270 gety$:ify$<>""then270
280 pf=0:gety$:ify$=""then280
290 ify$="y"thenpf=1
300 print" insert disk to check then press return"
310 print spc(2)"(flashing [150]red[153] drive light is normal)"
320 geta$:ifa$<>chr$(13)then320
330 open15,8,15:print#15,"i":close15
340 rem define # of sectors on tracks
350 forj=1to17:tr(j)=20:next:forj=18to23:tr(j)=18:next
360 forj=24to30:tr(j)=17:next:forj=31to40:tr(j)=16:next
370 fort=fttolt:print"[147]";:printspc(15)"track ";t
380 print"[153] sector error explanation"
390 fors=0totr(t)
400 print"[153]sector # ";s;:ifs<10thenprint" ";
410 open15,8,15
420 print#15,"m-w"chr$(6)chr$(0)chr$(2)chr$(t)chr$(s)
430 print#15,"m-w"chr$(0)chr$(0)chr$(1)chr$(128)
440 print#15,"m-r"chr$(0)chr$(0)
450 get#15,a$:a=asc(a$+chr$(0)):ifa>99then440
460 ifa=1thenprint" no errors":goto550
470 ifa=2thenb$="[158]block header gone"
480 ifa=3thenb$="[159]sync character gone"
490 ifa=4thenb$="[154]header checksum bad"
500 ifa=5thenb$="[156]read checksum bad"
510 ifa=6thenb$="bit pattern error"
520 ifa=9thenb$="header checksum bad"
530 ifa=11thenb$="[129]format id mismatch"
540 print" ";a+18;" ";b$
550 close15
560 ifpf=0ora=1then590
570 open4,4:cmd4:print#4,"track ";t;" sector";s;" error #";a+18;
580 print#4," ";b$:close4
590 next:next
600 printspc(8)"press return to continue[153]"
610 gety$:ify$<>chr$(13)then610
620 goto130